Skip to main content
POST
/
notifications
Create a notification
curl --request POST \
  --url https://your_a2_service/notifications \
  --header 'Content-Type: application/json' \
  --data '{
  "created_at": "2023-11-07T05:31:56Z",
  "is_read": true,
  "message": {
    "code": "publish_request",
    "params": {}
  },
  "updated_at": "2023-11-07T05:31:56Z",
  "user_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
}'
{
  "created_at": "2023-11-07T05:31:56Z",
  "is_read": true,
  "message": {
    "code": "publish_request",
    "params": {}
  },
  "no": 123,
  "updated_at": "2023-11-07T05:31:56Z",
  "user_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
}

Body

application/json

Schema for creating a new notification.

is_read
boolean
required

Indicates whether the notification has been read.

user_id
string<uuid>
required

The ID of the user.

created_at
string<date-time> | null

The date and time the entity was created.

message
object

The message content.

Examples:
{ "code": "publish_request", "params": {} }
updated_at
string<date-time> | null

The date and time the entity was last updated.

Response

Successful Response

Schema for reading notification entity.

is_read
boolean
required

Indicates whether the notification has been read.

no
integer
required

The ID for the notification.

user_id
string<uuid>
required

The ID of the user.

created_at
string<date-time> | null

The date and time the entity was created.

message
object

The message content.

Examples:
{ "code": "publish_request", "params": {} }
updated_at
string<date-time> | null

The date and time the entity was last updated.